package com.ybwh.springboot2.sharding5.ext.kengen;


import org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
import org.apache.shardingsphere.infra.algorithm.keygen.core.KeyGenerateAlgorithm;

import java.util.Collection;
import java.util.Properties;

/**
 * <p>
 * 百度UidGenerator
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2023/4/12 14:51
 */
public class BaiduUid implements KeyGenerateAlgorithm {
    private Properties props = new Properties();


    @Override
    public void init(final Properties props) {
        this.props = props;
    }


    @Override
    public String getType() {
        return "uidGenerator";
    }

    @Override
    public Collection<Object> getTypeAliases() {
        return KeyGenerateAlgorithm.super.getTypeAliases();
    }

    @Override
    public boolean isDefault() {
        return true;
    }


    @Override
    public Collection<? extends Comparable<?>> generateKeys(AlgorithmSQLContext algorithmSQLContext, int keyGenerateCount) {


//        return List.of();
        return null;
    }

}
